package bo.zhao.action.factory_method;

import bo.zhao.action.factory_method.factory.ISenderFactory;
import bo.zhao.action.factory_method.factory.MailSenderFactory;
import bo.zhao.action.factory_method.factory.SMSSenderFactory;
import bo.zhao.action.simple_factory.product.ISender;

public class FactoryMethodTest {

	public static void main(String[] args) {
		
		ISenderFactory msf=new MailSenderFactory();
		ISender sender=msf.produce();
		sender.send("邮件内容");
		
		ISenderFactory ssf=new SMSSenderFactory();
		sender=ssf.produce();
		sender.send("短信内容");
		
	}
	
}
